// pages/wyservice/rules/rules.js
const app = getApp()

Page({
  data: {
    ruleId: '',
    rule: {
      title: '',
      brief: '',
      coverUrl: '',
      content: '',
      modifyTime: ''
    },
    baseUrl: 'http://82.157.106.150/img/'
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log('ruleId:' + options.ruleId)
    app.sendGetRequest('/community/service/rules/' + options.ruleId, (res) => {
      console.log(res)
      this.setData({
        rule: res.data
      })
    }, (err) => {
      console.log(err.errMsg)
    })
  },

  onShow: function () {
  }
})